This invention relates generally to an imaginary computing system being executed by a computer system (a virtual machine) and in particular to a virtual machine that may have securely distributed bytecode verification.
A virtual machine (hereinafter "VM") is an imaginary computing machine generated by a software application which is similar to a conventional hardware central processing unit (hereinafter "CPU"), but also has several technological differences. The CPU and the VM both may have an instruction set and may use various different memory areas that may be segmented in some manner. A conventional CPU, as is well known, executes its instructions directly using some electronic hardware logic circuitry located within the CPU. For example, an ADD instruction may be executed by a hardware arithmetic logic unit (ALU) within the CPU. The VM, which is a software implementation being executed by a processor, however, does not execute its sequence of instructions directly using hardware electronic logic circuitry, such as the ALU, but rather converts the sequence of instructions into hardware-specific instructions either through a "last-minute" batch translation process, known as "just-in-time" compilation, or through a real-time interpretation process, known as interpretation. Due to the translation or interpretation, the programs or applications executed by the VM are platform-independent such that the hardware-specific instructions may be executed by any VM, regardless of the underlying operating system being used by the computer system containing the VM. For example, a VM system being executed on a Windows-based PC computer system will use the same instructions as a VM system being executed on a UNIX-based computer system.
The result of the platform-independent coding of a VM's instruction sequence is a stream of one or more bytecodes. These bytecodes are one byte long numerical codes commonly used to represent VM instructions for coding efficiency and compactness. Many different VM system architectures are currently being used in the computer and software industries.
A common characteristic of many VM system architectures is that they contain a built-in bytecode verification system which ensures that the programs or applications that the VM is requested to execute are a sequence of valid combinations of bytecodes and will not result, once translated or interpreted, into faulty execution steps performed by the underlying physical processing unit that is executing the VM system. The faulty execution steps may create errors or illegal accesses to hardware resources. Bytecode verification is particularly important if the physical processing unit and computing architecture executing the VM system is very sensitive to execution errors. It is also particularly important for a VM system that may contain especially valuable data because people may attempt to deceive the VM system with false bytecode in order to obtain access to the valuable data. For example, when the VM system is hosted inside a personal computer or workstation with valuable user files, or when the VM system is inside a product dedicated to participating in financial transactions, such as containing electronic representations of money, it is especially necessary to have a bytecode verification process to prevent unauthorized access to or corruption of the electronic representations of money.
Bytecode verification may be a sophisticated multi-step process which greatly increases the memory required to store the VM system, which complicates the VM's architecture, and which degrades the performance of the VM system. This is especially a problem when the VM is intended to operate within a small, low-cost, portable, yet security-sensitive product, such as a smart card, electronic wallet or other consumer product possibly involved in electronic money transactions. A smart card may be a credit-card sized plastic card with an embedded microcontroller chip that executes some software applications stored on the card, including a VM system, to perform some electronic money transactions, such as debiting the amount of money contained within the smart card. The microcontrollers in these smart cards typically have limited processing power. In addition, a limited amount of memory is available on these smart cards. Thus, a bytecode verification process is especially cumbersome in a smart card system.
Therefore, conventional smart cards that perform bytecode verification on the smart card have degraded processing performance and require a large amount of memory to store the VM system due to the complex bytecode verification process. It is desirable to produce a low-cost, security sensitive product with a VM system that does not diminish the overall level of execution security of the VM system, but significantly reduces the complexity of the bytecode verifier located within the VM system.
Thus, there is a need for a VM system with securely distributed bytecode verification which avoid these and other problems of known devices, and it is to this end that the present invention is directed.